<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件对象</title>
    <script src="../jquery.min.js"></script>
    <style>
      div {
        width: 200px;
        height: 200px;
        background-color: pink;
      }
    </style>
</head>
<body>
  <div></div>
  <script>
    $(function () {
      $(document).click(function () {
        console.log("点击了document")
      })
      $('div').click(function (event) {
        //打印事件对象
        // console.log(event);
        console.log('点击了div');
        //阻止事件冒泡
        event.stopPropagation();
      })
    })
  </script>
</body>
</html>